package ge.gen.eBdgt.vo;

import ge.gen.eBdgt.utils.ProjUtils;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@SuppressWarnings("serial")
public final class IcnVO extends ValueObject  implements Comparable<IcnVO>{
	/**
	 * class variables
	 */
	public static final String CLASS_NAME = "com.ge.gen.eBdgt.app.icn.vo.IcnVO";
	public static final String DAO_CLASS_NAME = "com.ge.gen.eBdgt.app.icn.dao.IcnDAO";
	protected static String[] tableName;
	protected static String[] columnName;
	protected static Map<String, Integer> fieldNameToIndex;
	protected static Map<Integer, String> indexToFieldName;

	/**
	 * instance variables
	 */
	private java.lang.String icn = null;
	private java.lang.String icn2nd = null;
	private java.lang.String customer = null;
	private java.lang.String des = null;
	private java.lang.String description = null;
	private java.lang.String ee = null;
	private java.lang.String genSn = null;
	private java.lang.String me = null;
	private java.lang.String modDwg = null;
	private java.lang.String orderDate = null;
	private java.lang.String outageDate = null;
	private java.lang.String pm = null;
	private java.lang.String reqEng = null;
	private java.lang.String requestDate = null;
	private java.lang.String station = null;
	private java.lang.String status = null;
	private java.lang.String timesNo = null;
	private java.lang.String mainWorkScope1 = null;
	private java.lang.String mainWorkScope2 = null;
	private java.lang.String addlScope1 = null;
	private java.lang.String addlScope2 = null;
	private java.lang.String addlScope3 = null;
	private java.lang.String addlScope4 = null;
	private java.lang.String notes = null;
	private java.lang.String budget = null;
	
	private boolean orderInfoExist = false;
	private CmuTrackVO orderInfo = new CmuTrackVO();
	/**
	 * Support for Modification logic
	 */
	public final static int ICN = 0;
	public final static int ICN2ND = 1;
	public final static int CUSTOMER = 2;
	public final static int DES = 3;
	public final static int DESCRIPTION = 4;
	public final static int EE = 5;
	public final static int GENSN = 6;
	public final static int ME = 7;
	public final static int MODDWG = 8;
	public final static int ORDERDATE = 9;
	public final static int OUTAGEDATE = 10;
	public final static int PM = 11;
	public final static int REQENG = 12;
	public final static int REQUESTDATE = 13;
	public final static int STATION = 14;
	public final static int STATUS = 15;
	public final static int TIMESNO = 16;
	public final static int ADITIONALSCOPE1 = 17;
	public final static int ADITIONALSCOPE2 = 18;
	public final static int ADITIONALSCOPE3 = 19;
	public final static int ADITIONALSCOPE4 = 20;
	public final static int NOTES = 21;
	public final static int MAINWORKSCOPE1 = 22;
	public final static int MAINWORKSCOPE2 = 23;
	public final static int BUDGET = 23;

	/**
	 * Constructors
	 */
	public IcnVO() {
		// By default, the instance is in com.ge.gen.util.CRUD.CREATE state.
		this.setCRUD(CRUD.CREATE);
		this.dirtyAttrs = new byte[] { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
				-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 , -1};
	}

	public IcnVO(final java.lang.String icn, final java.lang.String icn2nd,
			final java.lang.String customer, final java.lang.String des,
			final java.lang.String description, final java.lang.String ee,
			final java.lang.String genSn, final java.lang.String me,
			final java.lang.String modDwg, final java.lang.String orderDate,
			final java.lang.String outageDate, final java.lang.String pm,
			final java.lang.String reqEng, final java.lang.String requestDate,
			final java.lang.String station, final java.lang.String status,
			final java.lang.String timesNo, final java.lang.String addlScope1,
			final java.lang.String addlScope2,
			final java.lang.String addlScope3,
			final java.lang.String addlScope4, final java.lang.String notes,final java.lang.String mainWorkScope1,final java.lang.String mainWorkScope2, final java.lang.String budget) {
		this.dirtyAttrs = new byte[] { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
				-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1, -1, -1 };
		existingRow = true;
		// assign all incoming parameters to instance variables. Notice the use
		// of "this"
		this.icn = icn;
		this.icn2nd = icn2nd;
		this.customer = customer;
		this.des = des;
		this.description = description;
		this.ee = ee;
		this.genSn = genSn;
		this.me = me;
		this.modDwg = modDwg;
		this.orderDate = orderDate;
		this.outageDate = outageDate;
		this.pm = pm;
		this.reqEng = reqEng;
		this.requestDate = requestDate;
		this.station = station;
		this.status = status;
		this.timesNo = timesNo;
		this.addlScope1 = addlScope1;
		this.addlScope2 = addlScope2;
		this.addlScope3 = addlScope3;
		this.addlScope4 = addlScope4;
		this.notes = notes;
		this.mainWorkScope1 = mainWorkScope1;
		this.mainWorkScope2 = mainWorkScope2;
	}

	public int getNumFields() {
		return 24;
	}

	public int getFieldIndex(final String fieldName) {
		return fieldNameToIndex.get(fieldName);
	}

	public String getColumnName(final int indexNo) {
		return columnName[indexNo];
	}

	public String getTableName(final int indexNo) {
		return tableName[indexNo];
	}

	static {
		tableName = new String[] { "req_wrk_load", "req_wrk_load",
				"req_wrk_load", "req_wrk_load", "req_wrk_load", "req_wrk_load",
				"req_wrk_load", "req_wrk_load", "req_wrk_load", "req_wrk_load",
				"req_wrk_load", "req_wrk_load", "req_wrk_load", "req_wrk_load",
				"req_wrk_load", "req_wrk_load", "req_wrk_load", "req_wrk_load",
				"req_wrk_load", "req_wrk_load", "req_wrk_load", "req_wrk_load",  "req_wrk_load" };
		columnName = new String[] { "ICN", "ICN_2ND", "CUSTOMER", "DES",
				"DESCRIPTION", "EE", "GEN_SN", "ME", "MOD_DWG", "ORDER_DATE",
				"OUTAGE_DATE", "PM", "REQ_ENG", "REQUEST_DATE", "STATION",
				"STATUS", "TIMES_NO", "ADITIONALSCOPE1", "ADITIONALSCOPE2",
				"ADITIONALSCOPE3", "ADITIONALSCOPE4", "NOTES", "BUDGET" };
		fieldNameToIndex = new HashMap<String, Integer>();
		indexToFieldName = new HashMap<Integer, String>();
		fieldNameToIndex.put("icn", ICN);
		indexToFieldName.put(ICN, "icn");
		fieldNameToIndex.put("icn2nd", ICN2ND);
		indexToFieldName.put(ICN2ND, "icn2nd");
		fieldNameToIndex.put("customer", CUSTOMER);
		indexToFieldName.put(CUSTOMER, "customer");
		fieldNameToIndex.put("des", DES);
		indexToFieldName.put(DES, "des");
		fieldNameToIndex.put("description", DESCRIPTION);
		indexToFieldName.put(DESCRIPTION, "description");
		fieldNameToIndex.put("ee", EE);
		indexToFieldName.put(EE, "ee");
		fieldNameToIndex.put("genSn", GENSN);
		indexToFieldName.put(GENSN, "genSn");
		fieldNameToIndex.put("me", ME);
		indexToFieldName.put(ME, "me");
		fieldNameToIndex.put("modDwg", MODDWG);
		indexToFieldName.put(MODDWG, "modDwg");
		fieldNameToIndex.put("orderDate", ORDERDATE);
		indexToFieldName.put(ORDERDATE, "orderDate");
		fieldNameToIndex.put("outageDate", OUTAGEDATE);
		indexToFieldName.put(OUTAGEDATE, "outageDate");
		fieldNameToIndex.put("pm", PM);
		indexToFieldName.put(PM, "pm");
		fieldNameToIndex.put("reqEng", REQENG);
		indexToFieldName.put(REQENG, "reqEng");
		fieldNameToIndex.put("requestDate", REQUESTDATE);
		indexToFieldName.put(REQUESTDATE, "requestDate");
		fieldNameToIndex.put("station", STATION);
		indexToFieldName.put(STATION, "station");
		fieldNameToIndex.put("status", STATUS);
		indexToFieldName.put(STATUS, "status");
		fieldNameToIndex.put("timesNo", TIMESNO);
		indexToFieldName.put(TIMESNO, "timesNo");
		fieldNameToIndex.put("addlScope1", ADITIONALSCOPE1);
		indexToFieldName.put(ADITIONALSCOPE1, "addlScope1");
		fieldNameToIndex.put("addlScope2", ADITIONALSCOPE2);
		indexToFieldName.put(ADITIONALSCOPE2, "addlScope2");
		fieldNameToIndex.put("addlScope3", ADITIONALSCOPE3);
		indexToFieldName.put(ADITIONALSCOPE3, "addlScope3");
		fieldNameToIndex.put("addlScope4", ADITIONALSCOPE4);
		indexToFieldName.put(ADITIONALSCOPE4, "addlScope4");
		fieldNameToIndex.put("notes", NOTES);
		indexToFieldName.put(NOTES, "notes");
		fieldNameToIndex.put("budget", BUDGET);
		indexToFieldName.put(BUDGET, "budget");		
	}

	@Override
	public Object getFieldValue(final int indexNo) {
		switch (indexNo) {
		case ICN:
			return getIcn();

		case ICN2ND:
			return getIcn2nd();

		case CUSTOMER:
			return getCustomer();

		case DES:
			return getDes();

		case DESCRIPTION:
			return getDescription();

		case EE:
			return getEe();

		case GENSN:
			return getGenSn();

		case ME:
			return getMe();

		case MODDWG:
			return getModDwg();

		case ORDERDATE:
			return getOrderDate();

		case OUTAGEDATE:
			return getOutageDate();

		case PM:
			return getPm();

		case REQENG:
			return getReqEng();

		case REQUESTDATE:
			return getRequestDate();

		case STATION:
			return getStation();

		case STATUS:
			return getStatus();

		case TIMESNO:
			return getTimesNo();

		case ADITIONALSCOPE1:
			return getAddlScope1();

		case ADITIONALSCOPE2:
			return getAddlScope2();

		case ADITIONALSCOPE3:
			return getAddlScope3();

		case ADITIONALSCOPE4:
			return getAddlScope4();

		case NOTES:
			return getNotes();

		case BUDGET:
			return getBudget();
			
		default:
			return null;
		}
	}

	/**
	 * Code to make clone
	 */
	public Object clone() {
		IcnVO clonedObject = new IcnVO(this.icn, this.icn2nd, this.customer,
				this.des, this.description, this.ee, this.genSn, this.me,
				this.modDwg, this.orderDate, this.outageDate, this.pm,
				this.reqEng, this.requestDate, this.station, this.status,
				this.timesNo, this.addlScope1, this.addlScope2,
				this.addlScope3, this.addlScope4, this.notes, this.mainWorkScope1, this.mainWorkScope2, this.budget);
		clonedObject.setCRUD(this.crud);

		return clonedObject;
	}

	/**
	 * Getters
	 */
	public final java.lang.String getIcn() {
		return this.icn;
	}

	public final java.lang.String getIcn2nd() {
		return this.icn2nd;
	}

	public final java.lang.String getCustomer() {
		return this.customer;
	}

	public final java.lang.String getDes() {
		return this.des;
	}

	public final java.lang.String getDescription() {
		return this.description;
	}

	public final java.lang.String getEe() {
		return this.ee;
	}

	public final java.lang.String getGenSn() {
		return this.genSn;
	}

	public final java.lang.String getMe() {
		return this.me;
	}

	public final java.lang.String getModDwg() {
		return this.modDwg;
	}

	public final java.lang.String getOrderDate() {
		return ProjUtils.formatDate(this.orderDate);
	}

	public final java.lang.String getOutageDate() {
		return ProjUtils.formatDate(this.outageDate);
	}

	public final java.lang.String getPm() {
		return this.pm;
	}

	public final java.lang.String getReqEng() {
		return this.reqEng;
	}

	public final java.lang.String getRequestDate() {
		return ProjUtils.formatDate(this.requestDate);
	}

	public final java.lang.String getStation() {
		return this.station;
	}

	public final java.lang.String getStatus() {
		return this.status;
	}

	public final java.lang.String getTimesNo() {
		return this.timesNo;
	}

	public CmuTrackVO getOrderInfo() {
		return orderInfo;
	}

	public java.lang.String getAddlScope1() {
		return addlScope1;
	}

	public java.lang.String getAddlScope2() {
		return addlScope2;
	}

	public java.lang.String getAddlScope3() {
		return addlScope3;
	}

	public java.lang.String getAddlScope4() {
		return addlScope4;
	}

	public java.lang.String getNotes() {
		return notes;
	}

	public java.lang.String getMainWorkScope1() {
		return mainWorkScope1;
	}

	public java.lang.String getMainWorkScope2() {
		return mainWorkScope2;
	}

	public java.lang.String getBudget() {
		return budget;
	}

	public boolean isOrderInfoExist() {
		return orderInfoExist;
	}

	public void setOrderInfoExist(boolean orderInfoExist) {
		this.orderInfoExist = orderInfoExist;
	}

	public void setOrderInfo(CmuTrackVO orderInfo) {
		this.orderInfo = orderInfo;
	}

	/**
	 * Setters
	 */
	public final void setIcn(final java.lang.String icn) {
		// do not change any thing if the incoming value
		// is same as current value
		if ((((this.icn != null) && (icn != null)) && (this.icn.equals(icn)))
				|| ((this.icn == null) && (icn == null) && (this.dirtyAttrs[ICN] > -1))) {
			return;
		}

		// Now that it is sure that:
		// 1> incoming value is not same as present value
		// assign present value to the value of incoming value.
		this.icn = icn;

		if (this.dirtyAttrs[ICN] == -1) {
			// Save current value of [icn] for later use.
			// Activities like {ActivityLogging}, {Update} or {Delete} may use
			// the original value.
			saveOriginalValue(ICN, icn);
		}

		// every time the data is changed, increment the counter.
		this.dirtyAttrs[ICN] += 1;
	}

	public final void setIcn2nd(final java.lang.String icn2nd) {
		// do not change any thing if the incoming value
		// is same as current value
		if ((((this.icn2nd != null) && (icn2nd != null)) && (this.icn2nd
				.equals(icn2nd)))
				|| ((this.icn2nd == null) && (icn2nd == null) && (this.dirtyAttrs[ICN2ND] > -1))) {
			return;
		}

		// Now that it is sure that:
		// 1> incoming value is not same as present value
		// assign present value to the value of incoming value.
		this.icn2nd = icn2nd;

		if (this.dirtyAttrs[ICN2ND] == -1) {
			// Save current value of [icn2nd] for later use.
			// Activities like {ActivityLogging}, {Update} or {Delete} may use
			// the original value.
			saveOriginalValue(ICN2ND, icn2nd);
		}

		// every time the data is changed, increment the counter.
		this.dirtyAttrs[ICN2ND] += 1;
	}

	public final void setCustomer(final java.lang.String customer) {
		// do not change any thing if the incoming value
		// is same as current value
		if ((((this.customer != null) && (customer != null)) && (this.customer
				.equals(customer)))
				|| ((this.customer == null) && (customer == null) && (this.dirtyAttrs[CUSTOMER] > -1))) {
			return;
		}

		// Now that it is sure that:
		// 1> incoming value is not same as present value
		// assign present value to the value of incoming value.
		this.customer = customer;

		if (this.dirtyAttrs[CUSTOMER] == -1) {
			// Save current value of [customer] for later use.
			// Activities like {ActivityLogging}, {Update} or {Delete} may use
			// the original value.
			saveOriginalValue(CUSTOMER, customer);
		}

		// every time the data is changed, increment the counter.
		this.dirtyAttrs[CUSTOMER] += 1;
	}

	public final void setDes(final java.lang.String des) {
		// do not change any thing if the incoming value
		// is same as current value
		if ((((this.des != null) && (des != null)) && (this.des.equals(des)))
				|| ((this.des == null) && (des == null) && (this.dirtyAttrs[DES] > -1))) {
			return;
		}

		// Now that it is sure that:
		// 1> incoming value is not same as present value
		// assign present value to the value of incoming value.
		this.des = des;

		if (this.dirtyAttrs[DES] == -1) {
			// Save current value of [des] for later use.
			// Activities like {ActivityLogging}, {Update} or {Delete} may use
			// the original value.
			saveOriginalValue(DES, des);
		}

		// every time the data is changed, increment the counter.
		this.dirtyAttrs[DES] += 1;
	}

	public final void setDescription(final java.lang.String description) {
		// do not change any thing if the incoming value
		// is same as current value
		if ((((this.description != null) && (description != null)) && (this.description
				.equals(description)))
				|| ((this.description == null) && (description == null) && (this.dirtyAttrs[DESCRIPTION] > -1))) {
			return;
		}

		// Now that it is sure that:
		// 1> incoming value is not same as present value
		// assign present value to the value of incoming value.
		this.description = description;

		if (this.dirtyAttrs[DESCRIPTION] == -1) {
			// Save current value of [description] for later use.
			// Activities like {ActivityLogging}, {Update} or {Delete} may use
			// the original value.
			saveOriginalValue(DESCRIPTION, description);
		}

		// every time the data is changed, increment the counter.
		this.dirtyAttrs[DESCRIPTION] += 1;
	}

	public final void setEe(final java.lang.String ee) {
		// do not change any thing if the incoming value
		// is same as current value
		if ((((this.ee != null) && (ee != null)) && (this.ee.equals(ee)))
				|| ((this.ee == null) && (ee == null) && (this.dirtyAttrs[EE] > -1))) {
			return;
		}

		// Now that it is sure that:
		// 1> incoming value is not same as present value
		// assign present value to the value of incoming value.
		this.ee = ee;

		if (this.dirtyAttrs[EE] == -1) {
			// Save current value of [ee] for later use.
			// Activities like {ActivityLogging}, {Update} or {Delete} may use
			// the original value.
			saveOriginalValue(EE, ee);
		}

		// every time the data is changed, increment the counter.
		this.dirtyAttrs[EE] += 1;
	}

	public final void setGenSn(final java.lang.String genSn) {
		// do not change any thing if the incoming value
		// is same as current value
		if ((((this.genSn != null) && (genSn != null)) && (this.genSn
				.equals(genSn)))
				|| ((this.genSn == null) && (genSn == null) && (this.dirtyAttrs[GENSN] > -1))) {
			return;
		}

		// Now that it is sure that:
		// 1> incoming value is not same as present value
		// assign present value to the value of incoming value.
		this.genSn = genSn;

		if (this.dirtyAttrs[GENSN] == -1) {
			// Save current value of [genSn] for later use.
			// Activities like {ActivityLogging}, {Update} or {Delete} may use
			// the original value.
			saveOriginalValue(GENSN, genSn);
		}

		// every time the data is changed, increment the counter.
		this.dirtyAttrs[GENSN] += 1;
	}

	public final void setMe(final java.lang.String me) {
		// do not change any thing if the incoming value
		// is same as current value
		if ((((this.me != null) && (me != null)) && (this.me.equals(me)))
				|| ((this.me == null) && (me == null) && (this.dirtyAttrs[ME] > -1))) {
			return;
		}

		// Now that it is sure that:
		// 1> incoming value is not same as present value
		// assign present value to the value of incoming value.
		this.me = me;

		if (this.dirtyAttrs[ME] == -1) {
			// Save current value of [me] for later use.
			// Activities like {ActivityLogging}, {Update} or {Delete} may use
			// the original value.
			saveOriginalValue(ME, me);
		}

		// every time the data is changed, increment the counter.
		this.dirtyAttrs[ME] += 1;
	}

	public final void setModDwg(final java.lang.String modDwg) {
		// do not change any thing if the incoming value
		// is same as current value
		if ((((this.modDwg != null) && (modDwg != null)) && (this.modDwg
				.equals(modDwg)))
				|| ((this.modDwg == null) && (modDwg == null) && (this.dirtyAttrs[MODDWG] > -1))) {
			return;
		}

		// Now that it is sure that:
		// 1> incoming value is not same as present value
		// assign present value to the value of incoming value.
		this.modDwg = modDwg;

		if (this.dirtyAttrs[MODDWG] == -1) {
			// Save current value of [modDwg] for later use.
			// Activities like {ActivityLogging}, {Update} or {Delete} may use
			// the original value.
			saveOriginalValue(MODDWG, modDwg);
		}

		// every time the data is changed, increment the counter.
		this.dirtyAttrs[MODDWG] += 1;
	}

	public final void setOrderDate(final java.lang.String orderDate) {
		// do not change any thing if the incoming value
		// is same as current value
		if ((((this.orderDate != null) && (orderDate != null)) && (this.orderDate
				.equals(orderDate)))
				|| ((this.orderDate == null) && (orderDate == null) && (this.dirtyAttrs[ORDERDATE] > -1))) {
			return;
		}

		// Now that it is sure that:
		// 1> incoming value is not same as present value
		// assign present value to the value of incoming value.
		this.orderDate = orderDate;

		if (this.dirtyAttrs[ORDERDATE] == -1) {
			// Save current value of [orderDate] for later use.
			// Activities like {ActivityLogging}, {Update} or {Delete} may use
			// the original value.
			saveOriginalValue(ORDERDATE, orderDate);
		}

		// every time the data is changed, increment the counter.
		this.dirtyAttrs[ORDERDATE] += 1;
	}

	public final void setOutageDate(final java.lang.String outageDate) {
		// do not change any thing if the incoming value
		// is same as current value
		if ((((this.outageDate != null) && (outageDate != null)) && (this.outageDate
				.equals(outageDate)))
				|| ((this.outageDate == null) && (outageDate == null) && (this.dirtyAttrs[OUTAGEDATE] > -1))) {
			return;
		}

		// Now that it is sure that:
		// 1> incoming value is not same as present value
		// assign present value to the value of incoming value.
		this.outageDate = outageDate;

		if (this.dirtyAttrs[OUTAGEDATE] == -1) {
			// Save current value of [outageDate] for later use.
			// Activities like {ActivityLogging}, {Update} or {Delete} may use
			// the original value.
			saveOriginalValue(OUTAGEDATE, outageDate);
		}

		// every time the data is changed, increment the counter.
		this.dirtyAttrs[OUTAGEDATE] += 1;
	}

	public final void setPm(final java.lang.String pm) {
		// do not change any thing if the incoming value
		// is same as current value
		if ((((this.pm != null) && (pm != null)) && (this.pm.equals(pm)))
				|| ((this.pm == null) && (pm == null) && (this.dirtyAttrs[PM] > -1))) {
			return;
		}

		// Now that it is sure that:
		// 1> incoming value is not same as present value
		// assign present value to the value of incoming value.
		this.pm = pm;

		if (this.dirtyAttrs[PM] == -1) {
			// Save current value of [pm] for later use.
			// Activities like {ActivityLogging}, {Update} or {Delete} may use
			// the original value.
			saveOriginalValue(PM, pm);
		}

		// every time the data is changed, increment the counter.
		this.dirtyAttrs[PM] += 1;
	}

	public final void setReqEng(final java.lang.String reqEng) {
		// do not change any thing if the incoming value
		// is same as current value
		if ((((this.reqEng != null) && (reqEng != null)) && (this.reqEng
				.equals(reqEng)))
				|| ((this.reqEng == null) && (reqEng == null) && (this.dirtyAttrs[REQENG] > -1))) {
			return;
		}

		// Now that it is sure that:
		// 1> incoming value is not same as present value
		// assign present value to the value of incoming value.
		this.reqEng = reqEng;

		if (this.dirtyAttrs[REQENG] == -1) {
			// Save current value of [reqEng] for later use.
			// Activities like {ActivityLogging}, {Update} or {Delete} may use
			// the original value.
			saveOriginalValue(REQENG, reqEng);
		}

		// every time the data is changed, increment the counter.
		this.dirtyAttrs[REQENG] += 1;
	}

	public final void setRequestDate(final java.lang.String requestDate) {
		// do not change any thing if the incoming value
		// is same as current value
		if ((((this.requestDate != null) && (requestDate != null)) && (this.requestDate
				.equals(requestDate)))
				|| ((this.requestDate == null) && (requestDate == null) && (this.dirtyAttrs[REQUESTDATE] > -1))) {
			return;
		}

		// Now that it is sure that:
		// 1> incoming value is not same as present value
		// assign present value to the value of incoming value.
		this.requestDate = requestDate;

		if (this.dirtyAttrs[REQUESTDATE] == -1) {
			// Save current value of [requestDate] for later use.
			// Activities like {ActivityLogging}, {Update} or {Delete} may use
			// the original value.
			saveOriginalValue(REQUESTDATE, requestDate);
		}

		// every time the data is changed, increment the counter.
		this.dirtyAttrs[REQUESTDATE] += 1;
	}

	public final void setStation(final java.lang.String station) {
		// do not change any thing if the incoming value
		// is same as current value
		if ((((this.station != null) && (station != null)) && (this.station
				.equals(station)))
				|| ((this.station == null) && (station == null) && (this.dirtyAttrs[STATION] > -1))) {
			return;
		}

		// Now that it is sure that:
		// 1> incoming value is not same as present value
		// assign present value to the value of incoming value.
		this.station = station;

		if (this.dirtyAttrs[STATION] == -1) {
			// Save current value of [station] for later use.
			// Activities like {ActivityLogging}, {Update} or {Delete} may use
			// the original value.
			saveOriginalValue(STATION, station);
		}

		// every time the data is changed, increment the counter.
		this.dirtyAttrs[STATION] += 1;
	}

	public final void setStatus(final java.lang.String status) {
		// do not change any thing if the incoming value
		// is same as current value
		if ((((this.status != null) && (status != null)) && (this.status
				.equals(status)))
				|| ((this.status == null) && (status == null) && (this.dirtyAttrs[STATUS] > -1))) {
			return;
		}

		// Now that it is sure that:
		// 1> incoming value is not same as present value
		// assign present value to the value of incoming value.
		this.status = status;

		if (this.dirtyAttrs[STATUS] == -1) {
			// Save current value of [status] for later use.
			// Activities like {ActivityLogging}, {Update} or {Delete} may use
			// the original value.
			saveOriginalValue(STATUS, status);
		}

		// every time the data is changed, increment the counter.
		this.dirtyAttrs[STATUS] += 1;
	}

	public final void setTimesNo(final java.lang.String timesNo) {
		// do not change any thing if the incoming value
		// is same as current value
		if ((((this.timesNo != null) && (timesNo != null)) && (this.timesNo
				.equals(timesNo)))
				|| ((this.timesNo == null) && (timesNo == null) && (this.dirtyAttrs[TIMESNO] > -1))) {
			return;
		}

		// Now that it is sure that:
		// 1> incoming value is not same as present value
		// assign present value to the value of incoming value.
		this.timesNo = timesNo;

		if (this.dirtyAttrs[TIMESNO] == -1) {
			// Save current value of [timesNo] for later use.
			// Activities like {ActivityLogging}, {Update} or {Delete} may use
			// the original value.
			saveOriginalValue(TIMESNO, timesNo);
		}

		// every time the data is changed, increment the counter.
		this.dirtyAttrs[TIMESNO] += 1;
	}

	public void setAddlScope1(java.lang.String addlScope1) {
		// do not change any thing if the incoming value
		// is same as current value
		if ((((this.addlScope1 != null) && (addlScope1 != null)) && (this.addlScope1
				.equals(addlScope1)))
				|| ((this.addlScope1 == null) && (addlScope1 == null) && (this.dirtyAttrs[ADITIONALSCOPE1] > -1))) {
			return;
		}

		// Now that it is sure that:
		// 1> incoming value is not same as present value
		// assign present value to the value of incoming value.
		this.addlScope1 = addlScope1;

		if (this.dirtyAttrs[ADITIONALSCOPE1] == -1) {
			// Save current value of [addlScope1] for later use.
			// Activities like {ActivityLogging}, {Update} or {Delete} may use
			// the original value.
			saveOriginalValue(ADITIONALSCOPE1, addlScope1);
		}

		// every time the data is changed, increment the counter.
		this.dirtyAttrs[ADITIONALSCOPE1] += 1;

	}

	public void setAddlScope2(java.lang.String addlScope2) {
		// do not change any thing if the incoming value
		// is same as current value
		if ((((this.addlScope2 != null) && (addlScope2 != null)) && (this.addlScope2
				.equals(addlScope2)))
				|| ((this.addlScope2 == null) && (addlScope2 == null) && (this.dirtyAttrs[ADITIONALSCOPE2] > -1))) {
			return;
		}

		// Now that it is sure that:
		// 1> incoming value is not same as present value
		// assign present value to the value of incoming value.
		this.addlScope2 = addlScope2;

		if (this.dirtyAttrs[ADITIONALSCOPE2] == -1) {
			// Save current value of [addlScope2] for later use.
			// Activities like {ActivityLogging}, {Update} or {Delete} may use
			// the original value.
			saveOriginalValue(ADITIONALSCOPE2, addlScope2);
		}

		// every time the data is changed, increment the counter.
		this.dirtyAttrs[ADITIONALSCOPE2] += 1;
	}

	public void setAddlScope3(java.lang.String addlScope3) {
		// do not change any thing if the incoming value
		// is same as current value
		if ((((this.addlScope3 != null) && (addlScope3 != null)) && (this.addlScope3
				.equals(addlScope3)))
				|| ((this.addlScope3 == null) && (addlScope3 == null) && (this.dirtyAttrs[ADITIONALSCOPE3] > -1))) {
			return;
		}

		// Now that it is sure that:
		// 1> incoming value is not same as present value
		// assign present value to the value of incoming value.
		this.addlScope3 = addlScope3;

		if (this.dirtyAttrs[ADITIONALSCOPE3] == -1) {
			// Save current value of [addlScope3] for later use.
			// Activities like {ActivityLogging}, {Update} or {Delete} may use
			// the original value.
			saveOriginalValue(ADITIONALSCOPE3, addlScope3);
		}

		// every time the data is changed, increment the counter.
		this.dirtyAttrs[ADITIONALSCOPE3] += 1;
	}

	public void setAddlScope4(java.lang.String addlScope4) {
		// do not change any thing if the incoming value
		// is same as current value
		if ((((this.addlScope4 != null) && (addlScope4 != null)) && (this.addlScope4
				.equals(addlScope4)))
				|| ((this.addlScope4 == null) && (addlScope4 == null) && (this.dirtyAttrs[ADITIONALSCOPE4] > -1))) {
			return;
		}

		// Now that it is sure that:
		// 1> incoming value is not same as present value
		// assign present value to the value of incoming value.
		this.addlScope4 = addlScope4;

		if (this.dirtyAttrs[ADITIONALSCOPE4] == -1) {
			// Save current value of [addlScope4] for later use.
			// Activities like {ActivityLogging}, {Update} or {Delete} may use
			// the original value.
			saveOriginalValue(ADITIONALSCOPE4, addlScope4);
		}

		// every time the data is changed, increment the counter.
		this.dirtyAttrs[ADITIONALSCOPE4] += 1;
	}

	public void setNotes(java.lang.String notes) {
		// do not change any thing if the incoming value
		// is same as current value
		if ((((this.notes != null) && (notes != null)) && (this.notes
				.equals(notes)))
				|| ((this.notes == null) && (notes == null) && (this.dirtyAttrs[NOTES] > -1))) {
			return;
		}

		// Now that it is sure that:
		// 1> incoming value is not same as present value
		// assign present value to the value of incoming value.
		this.notes = notes;

		if (this.dirtyAttrs[NOTES] == -1) {
			// Save current value of [addlScope4] for later use.
			// Activities like {ActivityLogging}, {Update} or {Delete} may use
			// the original value.
			saveOriginalValue(NOTES, notes);
		}

		// every time the data is changed, increment the counter.
		this.dirtyAttrs[NOTES] += 1;
	}

	public void setMainWorkScope1(java.lang.String mainWorkScope1) {
		// do not change any thing if the incoming value
		// is same as current value
		if ((((this.mainWorkScope1 != null) && (mainWorkScope1 != null)) && (this.mainWorkScope1
				.equals(mainWorkScope1)))
				|| ((this.mainWorkScope1 == null) && (mainWorkScope1 == null) && (this.dirtyAttrs[MAINWORKSCOPE1] > -1))) {
			return;
		}

		// Now that it is sure that:
		// 1> incoming value is not same as present value
		// assign present value to the value of incoming value.
		this.mainWorkScope1 = mainWorkScope1;

		if (this.dirtyAttrs[MAINWORKSCOPE1] == -1) {
			// Save current value of [addlScope4] for later use.
			// Activities like {ActivityLogging}, {Update} or {Delete} may use
			// the original value.
			saveOriginalValue(MAINWORKSCOPE1, mainWorkScope1);
		}

		// every time the data is changed, increment the counter.
		this.dirtyAttrs[MAINWORKSCOPE1] += 1;
	}

	public void setMainWorkScope2(java.lang.String mainWorkScope2) {
		// do not change any thing if the incoming value
		// is same as current value
		if ((((this.mainWorkScope2 != null) && (mainWorkScope2 != null)) && (this.mainWorkScope2
				.equals(mainWorkScope2)))
				|| ((this.mainWorkScope2 == null) && (mainWorkScope2 == null) && (this.dirtyAttrs[MAINWORKSCOPE2] > -1))) {
			return;
		}

		// Now that it is sure that:
		// 1> incoming value is not same as present value
		// assign present value to the value of incoming value.
		this.mainWorkScope2 = mainWorkScope2;

		if (this.dirtyAttrs[MAINWORKSCOPE2] == -1) {
			// Save current value of [addlScope4] for later use.
			// Activities like {ActivityLogging}, {Update} or {Delete} may use
			// the original value.
			saveOriginalValue(MAINWORKSCOPE2, mainWorkScope2);
		}

		// every time the data is changed, increment the counter.
		this.dirtyAttrs[MAINWORKSCOPE2] += 1;
	}
	
	

	public void setBudget(java.lang.String budget) {
		// do not change any thing if the incoming value
		// is same as current value
		if ((((this.budget != null) && (budget != null)) && (this.budget
				.equals(budget)))
				|| ((this.budget == null) && (budget == null) && (this.dirtyAttrs[MAINWORKSCOPE2] > -1))) {
			return;
		}

		// Now that it is sure that:
		// 1> incoming value is not same as present value
		// assign present value to the value of incoming value.
		this.budget = budget;

		if (this.dirtyAttrs[BUDGET] == -1) {
			// Save current value of [addlScope4] for later use.
			// Activities like {ActivityLogging}, {Update} or {Delete} may use
			// the original value.
			saveOriginalValue(BUDGET, budget);
		}

		// every time the data is changed, increment the counter.
		this.dirtyAttrs[BUDGET] += 1;
	}

	/**
	 * .equals(Object object) implementation
	 */
	public final boolean equals(Object obj) {
		if ((obj == null) || !(obj instanceof ge.gen.eBdgt.vo.IcnVO)) {
			return false;
		}

		ge.gen.eBdgt.vo.IcnVO rightHandInstance = (ge.gen.eBdgt.vo.IcnVO) obj;
		boolean isEqual = true;

		if (isEqual) {
			isEqual = ((this.icn == null) ? (rightHandInstance.icn == null)
					: this.icn.equals(rightHandInstance.icn));
		}

		if (isEqual) {
			isEqual = ((this.icn2nd == null) ? (rightHandInstance.icn2nd == null)
					: this.icn2nd.equals(rightHandInstance.icn2nd));
		}

		if (isEqual) {
			isEqual = ((this.customer == null) ? (rightHandInstance.customer == null)
					: this.customer.equals(rightHandInstance.customer));
		}

		if (isEqual) {
			isEqual = ((this.des == null) ? (rightHandInstance.des == null)
					: this.des.equals(rightHandInstance.des));
		}

		if (isEqual) {
			isEqual = ((this.description == null) ? (rightHandInstance.description == null)
					: this.description.equals(rightHandInstance.description));
		}

		if (isEqual) {
			isEqual = ((this.ee == null) ? (rightHandInstance.ee == null)
					: this.ee.equals(rightHandInstance.ee));
		}

		if (isEqual) {
			isEqual = ((this.genSn == null) ? (rightHandInstance.genSn == null)
					: this.genSn.equals(rightHandInstance.genSn));
		}

		if (isEqual) {
			isEqual = ((this.me == null) ? (rightHandInstance.me == null)
					: this.me.equals(rightHandInstance.me));
		}

		if (isEqual) {
			isEqual = ((this.modDwg == null) ? (rightHandInstance.modDwg == null)
					: this.modDwg.equals(rightHandInstance.modDwg));
		}

		if (isEqual) {
			isEqual = ((this.orderDate == null) ? (rightHandInstance.orderDate == null)
					: this.orderDate.equals(rightHandInstance.orderDate));
		}

		if (isEqual) {
			isEqual = ((this.outageDate == null) ? (rightHandInstance.outageDate == null)
					: this.outageDate.equals(rightHandInstance.outageDate));
		}

		if (isEqual) {
			isEqual = ((this.pm == null) ? (rightHandInstance.pm == null)
					: this.pm.equals(rightHandInstance.pm));
		}

		if (isEqual) {
			isEqual = ((this.reqEng == null) ? (rightHandInstance.reqEng == null)
					: this.reqEng.equals(rightHandInstance.reqEng));
		}

		if (isEqual) {
			isEqual = ((this.requestDate == null) ? (rightHandInstance.requestDate == null)
					: this.requestDate.equals(rightHandInstance.requestDate));
		}

		if (isEqual) {
			isEqual = ((this.station == null) ? (rightHandInstance.station == null)
					: this.station.equals(rightHandInstance.station));
		}

		if (isEqual) {
			isEqual = ((this.status == null) ? (rightHandInstance.status == null)
					: this.status.equals(rightHandInstance.status));
		}

		if (isEqual) {
			isEqual = ((this.timesNo == null) ? (rightHandInstance.timesNo == null)
					: this.timesNo.equals(rightHandInstance.timesNo));
		}
		if (isEqual) {
			isEqual = ((this.mainWorkScope1 == null) ? (rightHandInstance.mainWorkScope1 == null)
					: this.mainWorkScope1.equals(rightHandInstance.mainWorkScope1));
		}
		if (isEqual) {
			isEqual = ((this.mainWorkScope2 == null) ? (rightHandInstance.mainWorkScope2 == null)
					: this.mainWorkScope2.equals(rightHandInstance.mainWorkScope2));
		}
		if (isEqual) {
			isEqual = ((this.addlScope1 == null) ? (rightHandInstance.addlScope1 == null)
					: this.addlScope1.equals(rightHandInstance.addlScope1));
		}
		if (isEqual) {
			isEqual = ((this.addlScope2 == null) ? (rightHandInstance.addlScope2 == null)
					: this.addlScope2.equals(rightHandInstance.addlScope2));
		}
		if (isEqual) {
			isEqual = ((this.addlScope3 == null) ? (rightHandInstance.addlScope3 == null)
					: this.addlScope3.equals(rightHandInstance.addlScope3));
		}
		if (isEqual) {
			isEqual = ((this.addlScope4 == null) ? (rightHandInstance.addlScope4 == null)
					: this.addlScope4.equals(rightHandInstance.addlScope4));
		}
		if (isEqual) {
			isEqual = ((this.notes == null) ? (rightHandInstance.notes == null)
					: this.notes.equals(rightHandInstance.notes));
		}
		if (isEqual) {
			isEqual = ((this.budget == null) ? (rightHandInstance.budget == null)
					: this.budget.equals(rightHandInstance.budget));
		}
		return isEqual;
	}

	/**
	 * .hasCode() implementation
	 */
	public final int hashCode() {
		int hc = 0;

		return hc;
	}

	/**
	 * toString() implementation
	 */
	public final String toString() {
		String value = "CRUD = ["
				+ this.crud
				+ "]: "
				+ "ClassName = [com.ge.gen.eBdgt.app.icn.vo.BdgtICNVO] has [17] instance variables. "
				+ "icn=" + icn + "," + "icn2nd=" + icn2nd + "," + "customer="
				+ customer + "," + "des=" + des + "," + "description="
				+ description + "," + "ee=" + ee + "," + "genSn=" + genSn + ","
				+ "me=" + me + "," + "modDwg=" + modDwg + "," + "orderDate="
				+ orderDate + "," + "outageDate=" + outageDate + "," + "pm="
				+ pm + "," + "reqEng=" + reqEng + "," + "requestDate="
				+ requestDate + "," + "station=" + station + "," + "status="
				+ status + "," + "timesNo=" + timesNo;

		if (originalValue != null) {
			value += " -*- ";
			value += "Original Value=[";

			for (int i = 0; i < originalValue.length; i++) {
				value += (indexToFieldName.get(i) + "=" + originalValue[i]);

				if (i != (originalValue.length - 1)) {
					value += ", ";
				}
			}
		}

		value += "]";

		return value;
	}

	@Override
	public int compareTo(IcnVO n) {			
		Date d1;
		Date d2;
		try {
			d1 = new Date(outageDate);	 	
			d2 = new Date( n.outageDate);
		} catch (Exception e) {
			return -1;
		}	
		return d2.compareTo(d1);		 		  
	}

	
}
